home *** CD-ROM | disk | FTP | other *** search
/ Video Toaster 4.2 / Video Toaster v4.2.iso / arexx / modeler / frenchtickler.lwm < prev    next >
Text File  |  1993-12-13  |  976b  |  45 lines

  1. /* ARexx test program Version 2 CMD: Test ARexx
  2.  * with GU interface!! */
  3.  
  4. libadd = addlib("LWModelerARexx.port",0)
  5.  
  6. SIGNAL ON ERROR
  7. SIGNAL ON SYNTAX
  8.  
  9. Val=""
  10. cmd='call MAKEBOX(-0.5,0.5)'
  11. /* cmd='call notify(1,"Reformat All HD Partitions?")' */
  12. LOOP:
  13. Continue=1
  14. do while Continue
  15.   call req_begin "Enter ARexx Command"
  16.   req=1
  17.   CmdId = req_addcontrol("",'S',40)
  18.   call req_setval CmdId,cmd
  19.   x = req_post()
  20.   if (x) then do
  21.      cmd = req_getval(CmdId)
  22.      end
  23.   else do
  24.      call req_end()
  25.      exit
  26.      end
  27.   call req_end()
  28.   if cmd="" then exit
  29.   interpret cmd
  30.   address command "wait 1 sec"
  31.   Continue = notify(2, '@ARexx Command:         ','!'cmd,'@Try Another?')
  32.   end
  33. exit
  34.  
  35. SYNTAX:
  36. ERROR:
  37.   cmdstr=strip(sourceline(SIGL))
  38.   if word(cmdstr,1)='interpret' then cmdstr=cmd
  39.   t=Notify(2,'!Oops! Error 'RC' has been detected on line 'SIGL ,'@'ErrorText(rc),cmdstr)
  40.   if t=0 then exit
  41.   SIGNAL ON ERROR
  42.   SIGNAL ON SYNTAX
  43.   signal LOOP
  44.   call notify('How did I get here?')
  45.